<table class="print table table-bordered  ">
    <thead>
        <tr >
            <th rowspan="2">No</th>
            <th rowspan="2">Nama Mandor</th>
            <th rowspan="2">Kode Vendor</th>
            <th rowspan="2">Nomor HP</th>
            <th rowspan="2">Kota</th>
            <th rowspan="2">Status</th>
            <th rowspan="2">Cabang</th>
            <th rowspan="2">Kode</th>
            <th rowspan="2">Proyek</th>
            <th colspan="2">Pekerjaan</th>
        </tr>
        <tr >
            <th>Ket.</th>
            <th>Harga</th>
        </tr>
    </thead>
    <tbody>
        
<?php
    $i = 0;
    $monitor_id = 0;
    foreach($data as $row){
        
            echo "
            <tr> ";
        if ($monitor_id != $row->monitor_id){
            $monitor_id = $row->monitor_id;
            $i ++;
            $rowspan = $row->rowspan;
            echo "
                <td rowspan=$rowspan >$i</td>
                <td rowspan=$rowspan >$row->mandor_nama</td>
                <td rowspan=$rowspan >$row->mandor_kode</td>
                <td rowspan=$rowspan >$row->mandor_telpon</td>
                <td rowspan=$rowspan >$row->mandor_kota</td>
                <td rowspan=$rowspan >$row->mandor_status</td>
                <td rowspan=$rowspan >$row->cabang_nama</td>
                <td rowspan=$rowspan >$row->proyek_kode</td>
                <td rowspan=$rowspan >$row->proyek_nama</td>
            ";
        }
        
        echo "
            <td>$row->harsat_ket</td>
            <td style='text-align:right'>Rp. ".number_format($row->harsat_nilai,0,",",".")."</td>
        </tr>
        ";
    }
?>
    </tbody>
</table>

        
